<template>
   <div class="container" >
    <div style="flex-basis: 50px;">
        {{ selectVl }}
    </div>
    <PtTable :lable="lable" :list="list"></PtTable>
   </div>
</template>
<script>
import PtTable from './components/PtTable.vue';
   export default {
     name: '',
     components:{
        PtTable
     },
     data: function(){
       return {
        lable:{
            id:"用户编码",
            userName:"用户名称",
            email:"邮箱"
        },
        list:[
            {id:1,userName:"张三",email:"123@.com"},
            {id:2,userName:"李四",email:"456@.com"},
            {id:3,userName:"王五",email:"789@.com"},
        ],
        selectVl:""
       }
     },
     methods:{
     },
     mounted:function(){
        var that = this;
        this.$bus.on("getTableVl",function(data){
            that.selectVl = data;
            console.info("getTableVl:" + data);
        });
     },
     unmounted:function(){
        this.$bus.off("getTableVl");
     }
   }
</script>
<style>
  html,
  body, 
  #app{
    height: 100%;
  }
</style>
<style scoped>
   .container {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
   }
   
</style>